package com.example.editview;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;

public class MainActivity extends AppCompatActivity {
    private EditText myEdit1,myEdit2;
    private Button btn1;
    private TextView myText;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        EdgeToEdge.enable(this);
        setContentView(R.layout.activity_main);
        myEdit1 = findViewById(R.id.ed_input1);
        myEdit2 = findViewById(R.id.ed_input2);
        btn1 = findViewById(R.id.btn);
        myText = findViewById(R.id.text);
        btn1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                String acconut = myEdit1.getText().toString().trim();
                String password = myEdit2.getText().toString().trim();
                myText.setText(acconut+','+password);
            }
        });
    }
}